#!/usr/bin/env python
# Wrapper to draw cfg arg1 = dbname arg2 = tname
import sys
sys.path.append('/opt/ssp_plugin/plib')
import libsql as sql
from gimple2graph import GRAPH


dbname = sys.argv[1]
tbname = "`%s`"%(sys.argv[2])
instance = sql.SQL(dbname, tbname)
G = GRAPH(sys.argv[2])
G.get(instance)
G.draw(name = 'cfg.png')
instance.free()
